package com.yjd.bi.report.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/1/10.
 */
public class WeeklyReportItem implements Serializable{
    // 父节点id（当前节点id=pid+1）
    private int pid;
    // 排序id（当前层级有效）
    private int sid;
    // 显示名称
    private String displayName;
//    // 字段名称
//    private String name;
    // 本周数值
    private String currentWeekValue;
    // 较上周相比提升/下降多少百分比（提升20%：+20，下降10%：-10，NA）
    private String thanLastWeek;
    // 下级节点
    private List<WeeklyReportItem> subItem;

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public String getCurrentWeekValue() {
        return currentWeekValue;
    }

    public void setCurrentWeekValue(String currentWeekValue) {
        this.currentWeekValue = currentWeekValue;
    }

    public String getThanLastWeek() {
        return thanLastWeek;
    }

    public void setThanLastWeek(String thanLastWeek) {
        this.thanLastWeek = thanLastWeek;
    }

    public List<WeeklyReportItem> getSubItem() {
        return subItem;
    }

    public void setSubItem(List<WeeklyReportItem> subItem) {
        this.subItem = subItem;
    }

    public void addSubItem(WeeklyReportItem si){
        if(null == this.subItem){
            this.subItem = new ArrayList<WeeklyReportItem>();
        }

        this.subItem.add(si);
    }
}
